﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ProResult.aspx.cs" Inherits="ProResult"
    MasterPageFile="~/Master.master" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2.Linq, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Data.Linq" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxCallbackPanel" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v10.2, Version=10.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPanel" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="MainContent">
    <h1 class="DemoTitle">
        项目成效登记
    </h1>
    <div id="DemoArea">
        <div class="Spacer" style="height: 14px;">
        </div>
        <dx:ASPxCallbackPanel ID="CBPanel" ClientInstanceName="QueryPanel" runat="server"
            OnCallback="CBPanel_Callback" Width="1000px">
            <PanelCollection>
                <dx:PanelContent>
                    <table border="0px" cellspacing="0" cellpadding="0" width="100%">
                        <tr>
                            <td align="right">
                                城区：
                            </td>
                            <td style="text-align: left;">
                                <dx:ASPxComboBox ID="CmbDis" runat="server" ClientInstanceName="cmbdis" IncrementalFilteringMode="StartsWith"
                                    EnableSynchronization="False" TextField="Community_Name" ValueField="Community_ID"
                                    Height="22px" Width="100px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt" SelectedIndex="0">
                                    <ItemStyle HorizontalAlign="Left" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </td>
                            <td align="right">
                                项目名称：
                            </td>
                            <td>
                                <asp:TextBox ID="txtName" runat="server" Height="20px" Width="100px"></asp:TextBox>
                            </td>
                            <td align="right">
                                年度：
                            </td>
                            <td>
                                <asp:TextBox ID="txtDate" runat="server" Height="20px" Width="100px"></asp:TextBox>
                            </td>
                            <td>
                                项目完成情况：
                            </td>
                            <td>
                                <dx:ASPxComboBox ID="CmbOr" runat="server" ClientInstanceName="cmbOr" IncrementalFilteringMode="StartsWith"
                                    EnableSynchronization="False" Height="22px" Width="100px" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                                    CssPostfix="Office2010Blue" Spacing="0" SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css"
                                    Font-Size="9pt" SelectedIndex="0">
                                    <Items>
                                        <dx:ListEditItem Text="完成" Value="0" />
                                        <dx:ListEditItem Text="未完成" Value="1" />
                                    </Items>
                                    <ItemStyle HorizontalAlign="Left" />
                                    <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                    </LoadingPanelImage>
                                    <LoadingPanelStyle ImageSpacing="5px">
                                    </LoadingPanelStyle>
                                    <ButtonStyle Width="13px">
                                    </ButtonStyle>
                                </dx:ASPxComboBox>
                            </td>
                            <td align="right">
                                <dx:ASPxButton ID="btnQuery" runat="server" Text="查询" AutoPostBack="False" UseSubmitBehavior="False"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Font-Bold="False">
                                    <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback();}" />
                                    <ClientSideEvents Click="function(s,e){QueryPanel.PerformCallback();}"></ClientSideEvents>
                                </dx:ASPxButton>
                            </td>
                            <td>
                                <dx:ASPxButton ID="btnCl" runat="server" Text="清空检索条件" AutoPostBack="False" UseSubmitBehavior="False"
                                    CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue"
                                    SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Font-Bold="False"
                                    OnClick="btnCl_Click">
                                </dx:ASPxButton>
                            </td>
                        </tr>
                    </table>
                    <dx:ASPxGridView ID="gvPro" runat="server" AutoGenerateColumns="False" DataSourceID="SDSAll"
                        KeyFieldName="Project_ID" Width="100%" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css"
                        CssPostfix="Office2010Blue">
                        <Columns>
                            <dx:GridViewDataTextColumn FieldName="Project_Name" VisibleIndex="0" Caption="项目名称">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataComboBoxColumn Caption="项目类型" FieldName="Type_ID" VisibleIndex="1"
                                Name="t_Type_ID">
                                <PropertiesComboBox ValueType="System.String" Spacing="0">
                                </PropertiesComboBox>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataComboBoxColumn Caption="所属城区(街区)" FieldName="Community_ID" VisibleIndex="2"
                                Name="t_Community_ID">
                                <PropertiesComboBox ValueType="System.String" Spacing="0">
                                </PropertiesComboBox>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataComboBoxColumn Caption="批准文号" FieldName="Approal_ID" VisibleIndex="3"
                                Name="t_AppNum">
                                <PropertiesComboBox ValueType="System.String" Spacing="0">
                                </PropertiesComboBox>
                            </dx:GridViewDataComboBoxColumn>
                            <dx:GridViewDataDateColumn Caption="完成时间" FieldName="FinishDate" VisibleIndex="4">
                                <PropertiesDateEdit Spacing="0" Width="200px">
                                </PropertiesDateEdit>
                            </dx:GridViewDataDateColumn>
                            <dx:GridViewDataTextColumn Caption="项目成效描述" FieldName="Project_Performance" VisibleIndex="5">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="项目执行情况" VisibleIndex="6">
                                <DataItemTemplate>
                                    <a href="ProExecute.aspx?id=<%#Eval("Project_ID")%>">执行情况登记</a></DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="项目成效登记" VisibleIndex="7">
                                <DataItemTemplate>
                                    <a href="EditResult.aspx?PID=<%#Eval("Project_ID") %>">成效登记</a>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="成效图片" VisibleIndex="8">
                                <DataItemTemplate>
                                    <a href="UpLoadImages/Upload.aspx?id=<%#Eval("Project_ID") %>">上传图片</a>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="成效附件" VisibleIndex="9">
                                <DataItemTemplate>
                                    <a href='ProResultUpload.aspx?ProID=<%#Eval("Project_ID") %>'>上传附件</a></DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <SettingsPager PageSize="8">
                            <Summary Text="当前第{0}页，共{1}页，{2}条记录" />
                        </SettingsPager>
                        <SettingsEditing Mode="PopupEditForm" PopupEditFormWidth="800px" PopupEditFormHorizontalAlign="WindowCenter"
                            PopupEditFormVerticalAlign="WindowCenter"></SettingsEditing>
                        <SettingsText EmptyDataRow="没有记录" />
                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" CssPostfix="Office2010Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <StylesPager>
                            <PageNumber ForeColor="#3E4846">
                            </PageNumber>
                            <Summary ForeColor="#1E395B">
                            </Summary>
                        </StylesPager>
                        <StylesEditors ButtonEditCellSpacing="0">
                            <ProgressBar Height="21px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                </dx:PanelContent>
            </PanelCollection>
        </dx:ASPxCallbackPanel>
        <asp:SqlDataSource ID="SDSAll" runat="server" ConnectionString="<%$ ConnectionStrings:CMSConnectionString %>"
            SelectCommand="SELECT TypeInfo.Type_ID,
                                    ProjectDetails.Project_ID,
                                    ProjectDetails.Project_Name,
                                    ProjectDetails.Project_Development,
                                    ProjectDetails.Project_BasicInfo,
                                    ProjectDetails.Project_Address,
                                    ProjectDetails.Project_Scope,
                                    ProjectDetails.ServeObiect,
                                    ProjectDetails.ServerPersontime,
                                    ProjectDetails.ContactWay,
                                    ProjectDetails.other,
                                    ProjectDetails.Project_CitySubsidy,
                                    ProjectDetails.Project_DistrictFund,
                                    ProjectDetails.Project_FundsTotal,
                                    ProjectDetails.Community_ID,
                                    ProjectDetails.ApprovalNumber,
                                    Approal.Approal_ID,
                                    ProjectDetails.FinishDate,
                                    ProjectDetails.OperateDate,
                                    ProjectDetails.ReportDate,
                                    Project_Performance
                                    FROM ProjectDetails
                                    INNER JOIN TypeInfo
                                    ON ProjectDetails.Type_ID=TypeInfo.Type_ID
                                    INNER JOIN Approal
                                    ON Projectdetails.ApprovalNumber=Approal.ID
                                    ORDER BY ProjectDetails.FinishDate " OnSelecting="SDSAll_Selecting">
        </asp:SqlDataSource>
        <dx:LinqServerModeDataSource ID="LSMDSPro" runat="server" ContextTypeName="DAL.DataClassesDataContext"
            EnableUpdate="True" TableName="ProjectDetails" OnSelecting="LSMDSPro_Selecting"
            EnableDelete="True" EnableInsert="True" />
        <asp:SqlDataSource ID="SDSDis" runat="server" ConnectionString="<%$ ConnectionStrings:ManagerConnectionString %>"
            SelectCommand="SELECT Community_ID,Community_Name, Parent_ID FROM [Community] WHERE ([Community_ID] = @Community_ID)">
            <SelectParameters>
                <asp:SessionParameter Name="Community_ID" SessionField="D_ID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
        <asp:SqlDataSource ID="SDSDisAll" runat="server" ConnectionString="<%$ ConnectionStrings:ManagerConnectionString %>"
            SelectCommand="SELECT Community_ID,Community_Name, Parent_ID FROM [Community] WHERE ([Parent_ID] = @Parent_ID)">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="Parent_ID" Type="String" />
            </SelectParameters>
        </asp:SqlDataSource>
    </div>
</asp:Content>
